package ontology;

public enum Control implements Compare{
	
	POSITIVE,
	NEGATIVE,
	NULL;

	public static Control getControl(String attribute) {
		if(attribute.equalsIgnoreCase(Polarity.NEGATIVE.toString())){
			return Control.NEGATIVE;
		} else if(attribute.equalsIgnoreCase(Polarity.POSITIVE.toString())){
			return Control.POSITIVE;
		} else {
			return Control.NULL;
		}
	}

	public Comparison compareWith(Object other) {
		if(this.equals(other)){
			return Comparison.ALL_SAME;
		} 
		return Comparison.HAS_OPPOSING;
	}

}
